window.onload = function() {

	oDiv1 = document.getElementById('div1');
	oBtn1 = document.getElementById('btn1');

	oBtn1.onclick = function() {
		// open('http://www.baidu.com');
		open('http://www.baidu.com', '_self');
	};

	aBtn = oDiv1.getElementsByTagName('input');

	aBtn[1].onclick = function() {
		// alert(window.navigator.userAgent);
		if(window.navigator.userAgent.indexOf('MSIE') != -1) {
			alert('ie 浏览器');
		} else {
			alert('非 ie 浏览器');
		}
	};

	aBtn[2].onclick = function() {
		alert(window.location);
	};
};

var oDiv1 = null;
var oBtn1 = null;
var aBtn = null;

